package io.finer.erp.jeecg.stock.service;

import io.finer.erp.jeecg.stock.dto.StkIoBillEntryDTO;
import io.finer.erp.jeecg.stock.entity.StkIoBill;
import io.finer.erp.jeecg.stock.entity.StkIoBillEntry;
import io.finer.erp.jeecg.stock.vo.StkIoBillVO;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 明细
 * @Author: jeecg-boot
 * @Date:   2020-03-31
 * @Version: V1.0
 */
public interface IStkIoBillEntryService extends IService<StkIoBillEntry> {

	List<StkIoBillEntry> selectByMainId(String mainId);
	List<StkIoBillEntry> selectEditingByMainId(String mainId);
	void writebackInvoiced(String id, BigDecimal qty, BigDecimal amt);
	/**
	 * @Description 根据销售单的单号查询出入库明细
	 * @param orderNum
	 * @return
	 * Create at: 2020-10-15 16:13:13
	 * @author: duanyong
	 * Revision:
	 *    2020-10-15 16:13:13 - first revision by duanyong
	 *        
	 */
	List<StkIoBillEntry> getPurchaseOrderEntry(String orderNum);
	/**
	 * @Description 查询某物料的出入库情况
	 * @param materialId
	 * @return
	 * Create at: 2020-11-02 13:48:42
	 * @author: duany
	 * Revision:
	 *    2020-11-02 13:48:42 - first revision by duany
	 *        
	 */
	List<StkIoBillEntry> selectByMaterial(String materialId);
	
	/**
	 * @Description 查询根据采购单号查询原单类型为采购单的采购入库信息。
	 * @param purchaseNo 采购单号
	 * @return
	 * Create at: 2020-11-20 15:24:54
	 * @author: duany
	 * Revision:
	 *    2020-11-20 15:24:54 - first revision by duany
	 *        
	 */
	List<StkIoBillEntry> selectByPurchase(String purchaseNo);
	
	/**
	 * @Description 供应商-采购入库历史记录
	 * @param page
	 * @param vo
	 * @return
	 * Create at: 2021-09-07 09:22:08
	 * @author: xzs
	 * Revision:
	 *    2021-09-07 09:22:08 - first revision by xzs
	 *
	 */
	IPage<StkIoBillEntryDTO> getBillEntryBySupplier(IPage<StkIoBillEntryDTO> page, StkIoBillVO vo);
}
